package com.example.learnquartz.task;

import com.example.learnquartz.entity.SysConfig;
import com.example.learnquartz.service.ISysConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author lzh
 * @date 2020/6/29 - 16:32
 */
@Component("myTask")
@Slf4j
public class MyTask {


    private ISysConfigService iSysConfigService;

    public MyTask(ISysConfigService iSysConfigService) {
        this.iSysConfigService = iSysConfigService;
    }

    public void myNoParams() {

        log.info("执行无参方法");
        SysConfig sysConfig = new SysConfig();
        List<SysConfig> list = iSysConfigService.selectConfigList(sysConfig);
        System.out.println(list.toString());
        log.info("执行完毕-------------------------");
    }
}
